import request from '@/api/request'
//地址列表
function addressList(data) {
    return request({
      url: '/lejuAdmin/companyAddress/addressList',
      method: 'GET',
      data
    })
  }
//新增地址
function save(data) {
    return request({
      url: '/lejuAdmin/companyAddress/save',
      method: 'POST',
      data
    })
  }
//设置收货默认
function setReceiveOne(data) {
    return request({
      url: '/lejuAdmin/companyAddress/setReceiveOne',
      method: 'POST',
      data
    })
  }
//设置发货默认
function setSendOne(data) {
    return request({
      url: '/lejuAdmin/companyAddress/setSendOne',
      method: 'POST',
      data
    })
  }
//更新地址
function update(data) {
    return request({
      url: '/lejuAdmin/companyAddress/update',
      method: 'POST',
      data
    })
  }
//删除地址
function delAddress(id,data) {
    return request({
      url: `/lejuAdmin/companyAddress/${id}`,
      method: 'DELETE',
      data
    })
  }
//地址明细
function getAddress(id,data) {
    return request({
      url: `/lejuAdmin/companyAddress/${id}`,
      method: 'GET',
      data
    })
  }


export default{
    addressList,save,setReceiveOne,setSendOne,update,delAddress,getAddress
}
